Platform Explorer / Nuxeo Platform 2023.12

Operation FileManager.CreateFolder (Create Folder)

Description

Create a Folder using the FileManagerService and set multiple properties on it.

The properties are specified as key=value pairs separated by a new line. The key used for a property is the property xpath. To specify multi-line values you can use a \ character followed by a new line.

Example:

dc:title=The Folder Title
dc:description=foo bar
For updating a date, you will need to expose the value as ISO 8601 format, for instance :

Example:

dc:title=The Folder Title
dc:issued=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}

To update a multi-valued field with multiple values:

custom:multivalued=a,b,c,d

Returns back the created folder.

Operation id FileManager.CreateFolder
Category Services
Label Create Folder
Requires
Since

Parameters

Name Description Type Required Default value
title string yes  
overwrite Whether to overwrite an existing folder with the same title, defaults to false boolean no  
properties properties no  

Signature

Inputs document
Outputs document

Implementation Information

Implementation Class Class: org.nuxeo.ecm.automation.core.operations.services.FileManagerCreateFolder
Contributing Component org.nuxeo.ecm.core.automation.features.operations

JSON Definition

{
  "id" : "FileManager.CreateFolder",
  "label" : "Create Folder",
  "category" : "Services",
  "requires" : null,
  "description" : "Create a Folder using the FileManagerService and set multiple properties on it.<p>The properties are specified as <i>key=value</i> pairs separated by a new line. The key used for a property is the property xpath. To specify multi-line values you can use a \\ character followed by a new line. <p>Example:<pre>dc:title=The Folder Title<br>dc:description=foo bar</pre>For updating a date, you will need to expose the value as ISO 8601 format, for instance : <p>Example:<pre>dc:title=The Folder Title<br>dc:issued=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}</pre><p>To update a multi-valued field with multiple values:<pre>custom:multivalued=a,b,c,d</pre><p>Returns back the created folder.",
  "url" : "FileManager.CreateFolder",
  "signature" : [ "document", "document" ],
  "params" : [ {
    "name" : "title",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "overwrite",
    "description" : "Whether to overwrite an existing folder with the same title, defaults to false",
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "properties",
    "description" : null,
    "type" : "properties",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  } ]
}